package com.jymj.enumEntity.floatpopu;

/**
 * Created by ljj on 2018/9/26. 从事职业
 */
public enum CszyEnum {
    one("农林牧渔生产", 10),
    two("生产制造加工", 21),
    ni("工程施工", 22),
    three("运输服务", 31),
    four("装饰装修", 32),
    five("餐饮服务", 33),
    six("休闲娱乐服务", 34),
    seven("家政服务", 35),
    nine("保安物管", 36),
    ten("维修服务", 37),
    fi("废旧物品收购", 38),
    te("其他商业服务", 39),
    ti("其他职业", 41),
    fu("失业", 51),;
    // 成员变量
    private String name;
    private int index;

    // 构造方法
    private CszyEnum(String name, int index) {
        this.name = name;
        this.index = index;
    }

    // 普通方法
    public static String getName(int index) {
        for (CszyEnum s : CszyEnum.values()) {
            if (s.getIndex() == index) {
                return s.name;
            }
        }
        return null;
    }

    // get set方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        this.index = index;
    }
}
